# -*- coding: utf-8 -*-
import unittest

from registrador import Registrador
import base

class TestRegistrador(unittest.TestCase):
    
    def setUp(self):
        self.registrador = Registrador()

    def test_registro(self):
        self.assertEqual(self.registrador.valor, '0'*base.TAM)
        self.registrador.valor = '1'*base.TAM
        self.assertEqual(self.registrador.valor, '1'*base.TAM)
        self.registrador.valor = '111'
        self.assertEqual(self.registrador.valor, '0'*(base.TAM-3) + '111')

if __name__ == '__main__':
    unittest.main()
